package mspbots.cw.callbacks.core;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import mspbots.cw.common.callback.CallbackAction;
import mspbots.cw.common.callback.CallbackEntityType;

import java.io.Serializable;

/**
 * com.mspbots.sync.callback.NoticeController
 *
 * @author Alex bob(https://github.com/vnobo)
 * @date Created by 2019/7/12
 */
@Data
public class CallbackMessage implements Serializable {

    private Long tenantId;

    @JsonProperty("ID")
    private Long id;

    @JsonProperty("FromUrl")
    private String fromUrl;

    @JsonProperty("CompanyId")
    private String companyId;

    @JsonProperty("MemberId")
    private String memberId;

    @JsonProperty("Action")
    private CallbackAction action;

    @JsonProperty("Type")
    private CallbackEntityType type;

    @JsonProperty("Entity")
    private String entity;

    public CallbackMessage setTenantId(Long tenantId) {
        this.tenantId = tenantId;
        return this;
    }
}
